#include <QtGui/QApplication>
#include "qmlapplicationviewer.h"
#include "starmenu.h"
#include "staritem.h"
#include "camfeatures.h"
#include "horizon.h"
#include "setting.h"

Q_DECL_EXPORT int main(int argc, char *argv[])
{
    QScopedPointer<QApplication> app(createApplication(argc, argv));

    qmlRegisterType<StarMenu>("StarMenu", 1, 0, "StarMenu");
    qmlRegisterType<StarItem>("StarMenu", 1, 0, "StarItem");
    qmlRegisterType<cameraFeatures>("CameraFeatures", 1, 0, "CameraFeatures");
    qmlRegisterType<Horizon>("Horizon", 1, 0, "Horizon");


    QmlApplicationViewer viewer;

    Settings settings("omgcam", "omgcam.conf");
    viewer.rootContext()->setContextProperty("settings", &settings);

    viewer.setOrientation(QmlApplicationViewer::ScreenOrientationLockLandscape);
    viewer.setMainQmlFile(QLatin1String("qml/OMGcam/main.qml"));
    viewer.showExpanded();

    return app->exec();
}
